using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace Awaken.CodeGen
{
    public class ManyToMany
    {
        protected Table manyToManyTable;
        public Table ManyToManyTable
        {
            get { return manyToManyTable; }
            set { manyToManyTable = value; }
        }

        protected Table currentTable;
        public Table CurrentTable
        {
            get { return currentTable; }
            set { currentTable = value; }
        }

        protected Table otherTable;
        public Table OtherTable
        {
            get { return otherTable; }
            set { otherTable = value; }
        }

        public string OtherTableIdColumnName
        {
            get { return OtherTable.IdColumns[0].ColumnName; }
        }

        public string CurrentTableIdColumnName
        {
            get { return CurrentTable.IdColumns[0].ColumnName;  } 
        }

        public string CurrentTableClassName
        {
            get { return CurrentTable.ClassName; }
        }

        public string ManyToManyTableName
        {
            get { return ManyToManyTable.TableName; }
        }

        public string OtherTableClassName
        {
            get { return OtherTable.ClassName; }
        }

        public string OtherTableCollectionName
        {
            get { return OtherTable.CollectionName; }
        }
    }
}
